package org.jsola.hr.query;

import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.query.BaseQuery;
import org.jsola.hr.dto.SyncSocWebSiteDTO;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

import static org.jsola.hr.example.SocDispatchCompanyEmpExample.E_SOC_DISPATCH_ID;
import static org.jsola.hr.example.SocDispatchCompanyEmpExample.N_SOC_DISPATCH_ID;

/**
 * 自定义的社保校验参数(区别于代码生成的query类)
 * @author lyh
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SocCheckCustomQuery extends SyncSocWebSiteDTO {

    private static final long serialVersionUID = 1L;

    @ApiParam(value = "年")
    @Length(max = 5)
    private String year;

    @ApiParam(value = "月")
    @Length(max = 5)
    private String month;

    @ApiParam(value = "公司Id")
    @Length(max = 32)
    private String companyId;

    @ApiParam(value = "参保月Id")
    @Length(max = 32)
    private String monthId;

    @ApiParam(value = "校验类型(1:本地校验;2:官方校验)")
    private Integer checkType;

    /**
     * 每页的条数
     */
    @ApiParam(value = "分页参数，每页的条数", example = "20")
    @Max(value = 1000, message = "pageSize不能大于1000")
    private Integer pageSize = 20;

    /**
     * 当前第几页
     */
    @ApiParam(value = "分页参数，第几页", example = "1")
    @Min(value = 1, message = "pageNo不能小于1")
    private Integer pageNo = 1;
}
